package types

type CategoryResp struct {
	Id       int            `json:"id"`
	Biz      string         `json:"biz,default=system" validate:"required"`
	ParentId int            `json:"parent_id" validate:"required"`
	Name     string         `json:"name" validate:"required"`
	OrderNum int64          `json:"order_num,default=0"`
	Children []CategoryResp `json:"children"`
}
type CategoryCreateReq struct {
	Biz      string `json:"biz"`
	Name     string `json:"name"`
	OrderNum int64  `json:"order_num,default=0"`
}

type CategoryUpdateReq struct {
	ParentId int    `json:"parent_id" validate:"required"`
	Name     string `json:"name" validate:"required"`
	OrderNum int64  `json:"order_num"`
}
